import { Component, OnInit, Injector, OnChanges } from '@angular/core';
import { ZoneResourceListBase } from '../zone-list-base';
import { ZonePersonnel } from 'app/modules/zone/services/zone.service';
import { ActivatedRoute } from '@angular/router';
import { PersonnelService } from 'app/modules/personnel/services/personnel.service';

@Component({
  selector: 'm-zone-personnel-list',
  templateUrl: './zone-personnel-list.component.html',
  styleUrls: ['./zone-personnel-list.component.scss'],
})
export class ZonePersonnelListComponent extends ZoneResourceListBase<ZonePersonnel> {
  constructor(private injector: Injector, private personnelService: PersonnelService) {
    super(injector, 'user');
  }
  permission(...pid: number[]) {
    if (!pid.length) {
      pid = this.selection.keys();
    }
    this.personnelService.permissionNav(this.zone, pid);
  }
}
